package com.catchman.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.catchman.service.SysUserService;
import com.catchman.entity.SysUser;
import com.catchman.vo.ResponseModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.catchman.annotation.PermInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统用户表 前端控制器
 * </p>
 *
 * @author CatchMan
 * @since 2019-05-17
**/
@Api(tags = {"系统用户表操作接口"})
@PermInfo(pval = "sys:user:*", value = "操作系统用户表的权限")
@RestController
@RequestMapping("/sysUser")
public class SysUserController {
   private static final Logger logger = LoggerFactory.getLogger(SysUserController.class);
   @Autowired
   private SysUserService sysUserService;

   /**
    * 查询分页数据
    */
   @ApiOperation(value = "分页查询系统用户表数据")
   @RequiresPermissions({"sys:user:list"})
   @GetMapping("/list")
   public ResponseModel findListByPage(@RequestParam(name = "current", defaultValue = "1") int current,
                               @RequestParam(name = "size", defaultValue = "20") int size){
       return null;
   }


   /**
    * 根据id查询
    */
   @ApiOperation(value = "根据id查询系统用户表数据")
   @RequiresPermissions({"sys:user:query"})
   @GetMapping("/getById")
   public ResponseModel getById(@RequestParam("pkid") String pkid){
       return null;
   }

   /**
    * 新增
    */
   @ApiOperation(value = "新增系统用户表数据")
   @RequiresPermissions({"sys:user:add"})
   @PostMapping("/add")
   public ResponseModel add(@RequestBody SysUser sysUser){
       return null;
   }

   /**
    * 批量删除
    */
   @ApiOperation(value = "批量删除系统用户表数据")
   @RequiresPermissions({"sys:user:delete"})
   @DeleteMapping("/del")
   public ResponseModel delete(@RequestParam("ids") List<String> ids){
       return null;
   }

   /**
    * 修改
    */
   @ApiOperation(value = "更新系统用户表数据")
   @RequiresPermissions({"sys:user:update"})
   @PutMapping("/update")
   public ResponseModel update(@RequestBody SysUser sysUser){
       return null;
   }

}

